<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0056)http://shop.dongxiangsoft.com/shop/product.aspx -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>商城</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content=IE=EmulateIE7 http-equiv=X-UA-Compatible>
<LINK rel=stylesheet href="css/detail.css">
<LINK rel=stylesheet href="css/reset.css">
<STYLE type=text/css>UNKNOWN {
	BACKGROUND-COLOR: #ececec; MARGIN: 0px
}
.STYLE1 {
	COLOR: #990000
}
BODY {
	FONT-SIZE: 12px
}
TD {
	FONT-SIZE: 12px
}
TH {
	FONT-SIZE: 12px
}
.STYLE2 {
	COLOR: #ff0000; FONT-WEIGHT: bold
}
.STYLE3 {
	COLOR: #333333
}
.STYLE13 {
	COLOR: #ffffff; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.STYLE14 {
	COLOR: #ff0000; FONT-SIZE: 24px
}
.STYLE16 {
	FONT-SIZE: 24px
}
.STYLE17 {
	BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: "宋体" , Arial, Helvetica, sans-serif; COLOR: rgb(85,85,85); FONT-SIZE: 12px
}
</STYLE>
<LINK rel=stylesheet href="list_files/min.css">
<SCRIPT src="list_files/common.js"></SCRIPT>

<SCRIPT type=text/javascript src="list_files/jquery-1.3.1.js"></SCRIPT>

<META name=GENERATOR content="MSHTML 9.00.8112.16450"></HEAD>
<BODY>
<LINK rel=stylesheet type=text/css 
href="list_files/indexcss.css">
<link rel="stylesheet" type="text/css" href="css/second.css">

<?php require'shophead.php'; 
/*echo "<script>alert('$flname');</script>";*/
 $sqlleft="select * from {$db_prefix}psort where flname ='$flname'";  
  $rsleft=$db->get_one($sqlleft);
?> 


<TABLE style="BORDER-BOTTOM: #cccccc 0px solid" border=0 cellSpacing=0 
cellPadding=0 style=" width:1000px;" align=center height=5>
</TABLE>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=1000 style="min-height:400px;" align=center>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff vAlign=top style=" width:220px;">
    	
        
        
        
        
        <div id="content">      
   <div class="left_content">
      <div class="games">
      	<div class="daohang">
			<span>热卖排行榜</span>
		</div>
        
        
					 <?
  $query='';
  if ($act=='query'){
  	if ($psortid!=''){
		$pstr='';
		$sqlf="select id,flname from {$db_prefix}psort where find_in_set('$psortid',path)>0 or id='$psortid'";
		$resultf=$db->query($sqlf);
		while($rsf=$db->fetch_array($resultf)){
			if ($pstr!='') $pstr.=',';$pstr.=$rsf['id'];
		}
		$db->free_result($resultf);
		
		if ($pstr!=''){
			$query.=" and find_in_set(psortid,'$pstr')>0";
		}
	}	
	if (trim($productname)!='') $query.=" and productname like '%".trim($productname)."%'";
	if (trim($price1)!='') $query.=" and price>='".trim($price1)."'";
	if (trim($price2)!='') $query.=" and price<='".trim($price2)."'";
	if (trim($scprice1)!='') $query.=" and scprice>='".trim($scprice1)."'";
	if (trim($scprice2)!='') $query.=" and scprice<='".trim($scprice2)."'";
	if (trim($pv1)!='') $query.=" and pv>='".trim($pv1)."'";
	if (trim($pv2)!='') $query.=" and pv<='".trim($pv2)."'";
  }
  
  $sql="select count(id) as c  from {$db_prefix}products where 1";
  if ($query!='') $sql.=$query;
  $rs=$db->get_one($sql);
  $page=new pagecls(24,intval($rs['c']));
  $sql="select * from {$db_prefix}products where 1 && selling=1";
  if ($query!='') $sql.=$query;
  $sql.=" order by id asc limit {$page->pastnum},{$page->pagesize}";
  $result=$db->query($sql);
  while($rs=$db->fetch_array($result)){
  ?>
					<div class="shangpin1">
						<div class="y2">
							<a href="product_order.php?id=<?=$rs['id']?>" target="_blank"><? if ($rs['pimg']) {?><img src="../uploads/productimgs/<?=$rs['pimg']?>" width="50px" height="50px"><? }?></a>
						</div>
						<div class="y3">
							<div class="top">
								<a href="product_order.php?id=<?=$rs['id']?>" target="_blank"><?=$rs['productname']?></a>
								<div class="bottom"><?=$rs['scprice']?></div>
							</div>
							
						</div>
					</div>
					<?
  }
  $db->free_result($result);
?> 
                    
                    
      </div>
   </div>   
   
</div>
        
        
        
        
        
        
        
        
        
    </TD>
   	<TD bgColor=#ffffff vAlign=top style=" width:780px;">
      <TABLE style="BORDER-BOTTOM: #de0635 1px solid" border=0 cellSpacing=0 
      cellPadding=0 width="100%" height=31>
        <TBODY>
        <TR>
          <TD width="15%">
            <TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" 
              height=33><TBODY>
              <TR>
                <TD background=list_files/title_bg.jpg align=center><SPAN 
                  class=STYLE13>商品列表</SPAN> </TD></TR></TBODY></TABLE></TD>
          <TD width="85%"></TD></TR></TBODY></TABLE><BR>  
          
             
       <TABLE 
      style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid" 
      border=0 cellSpacing=0 cellPadding=0 width="100%">
        <TBODY>
        <TR>
          <TD>
            <TABLE style="BORDER-COLLAPSE: collapse" id=DataList1 border=0 
            cellSpacing=0>
              <TBODY>
       
       
       
       <div class="smc1">
       
       
       <?    
		  $psortid=$rsleft['id'];
		 /* echo "<script>alert('$psortid');</script>";*/
		  if ($psortid!=''){
			$pstr='';
			$sqlf="select id,flname from {$db_prefix}psort where find_in_set('$psortid',path)>0 or id='$psortid'";
			$resultf=$db->query($sqlf);
			while($rsf=$db->fetch_array($resultf)){
					if ($pstr!='') $pstr.=',';$pstr.=$rsf['id'];
			}
			$db->free_result($resultf);
			if ($pstr!=''){
				$query.=" and find_in_set(psortid,'$pstr')>0";
			}
		  }	
		  $sql="select count(id) as c  from {$db_prefix}products where 1";
		  if ($query!='') $sql.=$query;
		  $rs=$db->get_one($sql);
		  $sum=$rs['c'];
		 /* echo "<script>alert('$sum');</script>";*/
		  $times=$sum/3;
		  for($i=0;$i<=$times;$i++){
		  
		  ?>
                        <ul class="clist style{$key+1}">
<?
					$start=$i*3;
                	$sqlsp="select *  from {$db_prefix}products where 1 ";
				  	if ($query!='') $sqlsp.=$query;
					$sqlsp.=" limit $start,3 ";
				  	$resultflsp=$db->query($sqlsp);
  					while($rsflsp=$db->fetch_array($resultflsp)){
				?>
                        	<li class="fore{$key+1}">
                            	<div class="p_img">
                                        <a href="product_order.php?id=<?=$rsflsp['id']?>" target="_blank">
                                            <img src="../uploads/productimgs/<?=$rsflsp['pimg']?>" alt="" width="220px" height="210px" />
                                        </a>
                                    </div>
                                    <div class="p_name">
                                        <a href="product_order.php?id=<?=$rsflsp['id']?>" target="_blank"><?=$rsflsp['productname']?></a>
                                    </div>
                                    <div class="p_price">
                                    	市场价：￥<?=$rsflsp['scprice']?>
                                        <span></span>
                                    </div>
                                    <div class="p_price">
                                    	会员价：￥<?=$rsflsp['price']?>
                                        <span></span>
                                    </div>
                            </li>
                            
<?
  }
  $db->free_result($result);
?>    
                        </ul>   
<? 
$db->free_result($result);
}
?>                                              
                    </div>
       
       
       
       
       
       
       
       
       </TABLE></TD></TR>
       </TABLE></TD></TR></TBODY></TABLE>
       
       
       
       
       
       
      <!-- <script type="text/javascript">
        $(function() {
            $('#nav_2014 .sub_nav').css('display', 'block');
            $('#nav_2014').off('mouseenter');
            $('#nav_2014').off('mouseleave');
        })

    </script>-->
       
       
       
       
       
       
       <BR>
<?php require_once("product_buy_foot.php");?>	
</BODY></HTML>
